﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DrugStorehouseMIS.Comm;
using DrugStorehouseMIS.DAL.Interface;


namespace DrugStorehouseMIS.DAL
{
    public class SystemFunctionDAL:ISystemFunction
    {

        #region ISystemFunctionDAL 成员

        public IDataReader GetSystemFunctionListAll()
        {
            return SqlDbHelper.RunProcedure_Reader(ConnectionString.ConnString, "Proc_SystemFunction_SelectAll");
        }

        public IDataReader GetSystemFunctionByParentId(int SystemFunctionParentID)
        {
            return SqlDbHelper.RunProcedure_Reader(ConnectionString.ConnString, "Proc_SystemFunction_SelectBy_ParentID", new SqlParameter[] { new SqlParameter("@SystemFunctionParentID", SystemFunctionParentID) });
        }

        public IDataReader GetSystemFunctionByFunctionId(int SystemFunctionID)
        {
            return SqlDbHelper.RunProcedure_Reader(ConnectionString.ConnString, "Proc_SystemFunction_SelectBy_FunctionID", new SqlParameter[] { new SqlParameter("@SystemFunctionID", SystemFunctionID) });
        }

        #endregion
    }
}
